package com.eastjet.maintenance.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 点检计划表
 * @TableName device_spotcheck
 */
@TableName(value ="device_spotcheck")
@Data
public class DeviceSpotcheck implements Serializable {
    /**
     * 点检计划编号
     */
    @TableId(type = IdType.AUTO)
    private Integer spotcheckId;

    /**
     * 点检计划名称
     */
    private String spotcheckName;

    /**
     * 点检计划编码
     */
    private String code;

    /**
     * 点检周期
     */
    private String spotcheckDaytypeId;

    /**
     * 执行周期规则(device_execution表)
     */
    private Integer spotcheckRoleId;

    /**
     * 计划开始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date spotcheckOntime;

    /**
     * 计划结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date spotcheckUntime;

    /**
     * 点检班组
     */
    private String spotcheckClassId;

    /**
     * 点检人
     */
    private String spotcheckPerson;

    /**
     * 备注
     */
    private String spotcheckNotes;

    /**
     * 调整原因
     */
    private String cause;

    /**
     * 创建人
     */
    private String insertPerson;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date insertTime;

    /**
     * 更新人
     */
    private String updatePerson;


    private String spotcheckState;

    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date updateTime;

    /**
     * 逻辑删除
     */
    private Integer isDelete;

    @TableField(exist = false)
    private DeviceExecution deviceExecution;

    @Override
    public String toString() {
        return "DeviceSpotcheck{" +
                "spotcheckId=" + spotcheckId +
                ", spotcheckName='" + spotcheckName + '\'' +
                ", code='" + code + '\'' +
                ", spotcheckDaytypeId='" + spotcheckDaytypeId + '\'' +
                ", spotcheckRoleId=" + spotcheckRoleId +
                ", spotcheckOntime=" + spotcheckOntime +
                ", spotcheckUntime=" + spotcheckUntime +
                ", spotcheckClassId='" + spotcheckClassId + '\'' +
                ", spotcheckPerson='" + spotcheckPerson + '\'' +
                ", spotcheckNotes='" + spotcheckNotes + '\'' +
                ", cause='" + cause + '\'' +
                ", insertPerson='" + insertPerson + '\'' +
                ", insertTime=" + insertTime +
                ", updatePerson='" + updatePerson + '\'' +
                ", spotcheckState='" + spotcheckState + '\'' +
                ", updateTime=" + updateTime +
                ", isDelete=" + isDelete +
                ", deviceExecution=" + deviceExecution +
                '}';
    }
}